﻿<UserControl x:Class="FlickrCarousel.CarouselItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:FlickrCarousel="clr-namespace:FlickrCarousel">
    <Grid x:Name="Root">
        <StackPanel x:Name="Container" VerticalAlignment="Bottom">
            <StackPanel.Projection>
                <PlaneProjection />
            </StackPanel.Projection>
            <Grid x:Name="ImageGrid" Width="480" Height="400" VerticalAlignment="Bottom">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <FlickrCarousel:ImageInfoPanel x:Name="InfoPanel" Height="320" Width="480"
                                               VerticalAlignment="Bottom" HorizontalAlignment="Center" 
                                               Visibility="Collapsed" /> 
                <Image x:Name="ImageItem" Grid.Column="0" Grid.Row="0" Width="480" Height="5000"
                       VerticalAlignment="Center" HorizontalAlignment="Center"
                       SizeChanged="image_SizeChanged" />
                <Rectangle x:Name="FlipImage" Width="40" Height="40" Grid.Column="0" Grid.Row="0"
                           VerticalAlignment="Bottom" HorizontalAlignment="Right"
                           Visibility="Collapsed" MouseLeftButtonUp="flipImage_MouseLeftButtonUp">
                    <Rectangle.Fill>
                        <ImageBrush ImageSource="flip_arrow.png" AlignmentX="Left" AlignmentY="Top" />
                    </Rectangle.Fill>
                </Rectangle>
                <Rectangle x:Name="PlaceholderImage" Width="480" Height="320"
                           Grid.Column="0" Grid.Row="0"
                           VerticalAlignment="Bottom" HorizontalAlignment="Center">
                    <Rectangle.Fill>
                        <ImageBrush ImageSource="loading.png" AlignmentX="Left" AlignmentY="Top" />
                    </Rectangle.Fill>
                </Rectangle>
            </Grid>
            <Rectangle x:Name="ImageShadow" Width="480" Height="12" VerticalAlignment="Bottom">
                <Rectangle.Fill>
                    <ImageBrush ImageSource="shadow.png" AlignmentX="Left" AlignmentY="Top" />
                </Rectangle.Fill>
            </Rectangle>
        </StackPanel>
    </Grid>
</UserControl>
